<template>
  <c-dialog ref="dialog" title="上传附件">
    <ImportFile :limit="100" @upload-success="changeHandle" @remove="changeHandle" />
    <div class="btn-container">
      <c-button @click="cancelHandle">取消</c-button>
      <c-button type="primary" @click="confirmHandle">确认</c-button>
    </div>
  </c-dialog>
</template>
<script>
import ImportFile from '@/components/importFile'
export default {
  name: 'Uploader',
  components: {
    ImportFile
  },
  props: {
  },
  data() {
    return {
      fileList: []
    }
  },
  methods: {
    changeHandle({ file, list }) {
      this.$emit('change', file)
    },
    confirmHandle() {
      this.$refs.dialog.visible = false
    },
    cancelHandle() {
      this.$refs.dialog.visible = false
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
